package cn.hx.admin.util;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

public class MianTest {
    public static void main(String[] args) {
        PasswordEncoder passwordEncoder = new BCryptPasswordEncoder();

        for (int i = 0; i < 10; i++) {
            String encode = passwordEncoder.encode("123456");
            System.out.println(encode);
        }
        String code="$2a$10$9XEk1ddA.30lfq1PVZKhH.J0PuyCbDv1gw0Urqjxteflo5XXthRkq";

        System.out.println(passwordEncoder.matches("123456", code));
        //passwordEncoder.upgradeEncoding()
    }
}
